package com.aaa.sb.service;

import com.aaa.sb.dao.DeptDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * className:DeptServiceImpl
 * discription:
 * author:zz
 * createTime:2018-11-21 11:29
 */
@Service
public class DeptServiceImpl implements  DeptService {

    //依赖注入
    @Autowired
    private DeptDao deptDao;

    /**
     * 部门查询
     * @return
     */
    @Override
    public List<Map> getList() {

        return deptDao.getList();
    }

    @Override
    public int getPageCount(Map map) {
        return deptDao.getPageCount(map);
    }

    /**
     * 部门添加
     * @param map
     * @return
     */
    @Override
    public int insertDept(Map map) {
        return deptDao.insertDept(map);
    }

    /**
     * 通过deptno查dept
     * @param paramMap
     * @return
     */
    @Override
    public List<Map> selectDeptById(Map paramMap) {
        return deptDao.selectDeptById(paramMap);
    }

    /**
     * 更新
     * @param map
     * @return
     */
    @Override
    public int updateDeptMsg(Map map) {
        return deptDao.updateDeptMsg(map);
    }

    /**
     * 删除
     * @param map
     * @return
     */
    @Override
    public int deleteOne(Map map) {
        return deptDao.deleteOne(map);
    }
}
